<?
if ($_POST[action] == "resume_postresume")
{

	if ($_POST['re_fname'] == '')
	{
		$err .= "First name is required<br>";
	}
	if ($_POST[re_lname] == '')
	{
		$err .= "Last Name is required<br>";
	}
	if ($_POST[re_email] == '')
	{
		$err .= "Contact Email  is required<br>";
	}elseif(!ereg("^[a-zA-Z0-9][a-zA-Z0-9_\.]+[a-zA-Z0-9]@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-\.]+$", $_POST[re_email])){
	      $err .= "Invalid Email address<br />";
	  
	}
	if ($_POST[re_phone1] == '')
	{
		$err .= "Contact Phone is required<br>";
	}
	if ($_POST[re_locity] == '')
	{
		$err .= "Location - City is required<br>";
	}
	if ($_POST[re_lostate] == '0')
	{
		$err .= "State must select one from the list<br>";
	}
	if ($_POST[re_locountry] == '0')
	{
		$err .= "Country must select one from the list<br>";
	}
	if ($_POST[re_yearexp] == '')
	{
		$err .= "Years of work experience is required<br>";
	}
	if ($_POST[re_edulevel] == '0')
	{
		$err .= "Highest Degree level must select one from the list<br>";
	}
	if ($_POST[re_mgmt] == '0')
	{
		$err .= "Years of people mgmt experience must select one from the list<br>";
	}
	if ($_POST[re_profit] == '0')
	{
		$err .= "Years of profit & loss responsibility must select one from the list<br>";
	}
	if($_POST[re_schoolattend] == ''){
		$err .= "School Attended is required<br> ";
	}
	if($_POST[re_jobtitle] == '')
	{
		$err .= "Current Job Title is required<br>";
	}
	if($_POST[re_currentpay] <= 0 ){
		$err .= "Current Base Salary is required<br>";
	}
	if($_POST[re_desiredpay] <= 0 ){
		$err .= "Desired Base Salary is required<br>";
	}
	if ($_POST[re_detail] == '')
	{
		$err .= "Resume detail is required<br>";
	}
	if ($err == '')
	{
		include ("./insert_do/resumepostresume.php");
	}
	else
	{
		$re_fname = htmlspecialchars(trim($_POST[re_fname]));
		$re_lname = htmlspecialchars(trim($_POST[re_lname]));
		$re_email = htmlspecialchars(trim($_POST[re_email]));
		$re_address1 = htmlspecialchars(trim($_POST[re_address1]));
		$re_address2 = htmlspecialchars(trim($_POST[re_address2]));
		$re_lostate = htmlspecialchars(trim($_POST[re_lostate]));
		$re_locountry = htmlspecialchars(trim($_POST[re_locountry]));
		$re_locity = htmlspecialchars(trim($_POST[re_locity]));
		$re_phone1 = htmlspecialchars(trim($_POST[re_phone1]));
		$re_phone2 = htmlspecialchars(trim($_POST[re_phone2]));
		$re_jobtype = htmlspecialchars(trim($_POST[re_jobtype]));
		$re_jobindustry = htmlspecialchars(trim($_POST[re_jobindustry]));
		$re_jobtitle = htmlspecialchars(trim($_POST[re_jobtitle]));
		$re_yearexp = htmlspecialchars(trim($_POST[re_yearexp]));
		$re_edulevel = htmlspecialchars(trim($_POST[re_edulevel]));
		$re_proflicense = htmlspecialchars(trim($_POST[re_proflicense]));
		$re_mgmt = htmlspecialchars(trim($_POST[re_mgmt]));
		$re_profit = htmlspecialchars(trim($_POST[re_profit]));
		$re_spoken = htmlspecialchars(trim($_POST[re_spoken]));
		$re_prolang = htmlspecialchars(trim($_POST[re_prolang]));
		$re_ip = htmlspecialchars(trim($_POST[re_ip]));
		$re_ussecurity = htmlspecialchars(trim($_POST[re_ussecurity]));
		$re_authorize = htmlspecialchars(trim($_POST[re_authorize]));
		$re_detail = trim($_POST[re_detail]);
		$re_comments = htmlspecialchars(trim($_POST[re_comments]));
		$re_currentpay = htmlspecialchars(trim($_POST[re_currentpay]));
		$re_desiredpay = htmlspecialchars(trim($_POST[re_desiredpay]));
		$re_jobsearchstatus = htmlspecialchars(trim($_POST[re_jobsearchstatus]));
		$re_benefits = htmlspecialchars(trim($_POST[re_benefits]));
		$re_schoolattend = htmlspecialchars(trim($_POST[re_schoolattend]));
		$re_describeme = htmlspecialchars(trim($_POST[re_describeme]));
		$re_favoriatebook = htmlspecialchars(trim($_POST[re_favoriatebook]));
		$re_highachieve = htmlspecialchars(trim($_POST[re_highachieve]));
		$re_iplan = htmlspecialchars(trim($_POST[re_iplan]));
		$re_iliketo = htmlspecialchars(trim($_POST[re_iliketo]));
		$re_personalweb= htmlspecialchars(trim($_POST[re_personalweb]));
		$re_prvemployer= htmlspecialchars(trim($_POST[re_prvemployer]));
		$re_prvempstatus= htmlspecialchars(trim($_POST[re_prvempstatus]));
		$re_professavilable= htmlspecialchars(trim($_POST[re_professavilable]));
		$re_private= htmlspecialchars(trim($_POST[re_private]));
		$re_id = htmlspecialchars(trim($_POST[editid]));
        $status = 1;
	}

}
?>